﻿/*   
yaols
signalR帮助类
*/


//启动
function initialSignalR(order_no) {

    var order = $.connection.orderHub;

    order.client.sendOrderNoResult = function (data) {
        console.log(data);
        if (data.state == 1) {
            window.location.href = "http://www.liaowa365.com/";

        }
    };


    // Start the connection.
    $.connection.hub.start().done(function () {
        console.log(order_no);
        order.server.getOrderNoHandle(order_no);
    });

}


//停止
function stopSignalR() {
    $.connection.hub.stop();
}